<!DOCTYPE html>
<html lang="en" xmlns:v-on="http://www.w3.org/1999/xhtml">
<head>
    <meta charset="UTF-8">
    <title>vue系列课程</title>
</head>
<body >
    <div id="app">

        <!-- v-show v-if -->
        <h2>{{msg}}</h2>
        
        <!--图片-->
        <img width="200" v-show="isShow" @mouseover="hide" style="border: 5px red solid;" src="https://gimg2.baidu.com/image_search/src=http%3A%2F%2Fimage.biaobaiju.com%2Fuploads%2F20180801%2F23%2F1533136040-oNcwkVuRxL.png&refer=http%3A%2F%2Fimage.biaobaiju.com&app=2002&size=f9999,10000&q=a80&n=0&g=0n&fmt=jpeg?sec=1614500688&t=6ba247b6f3bfc546584bf247f2b0e892" alt="这是图片">
        <img width="200" v-show="isShow" @mouseover="isShow=false" style="border: 5px red solid;" src="https://gimg2.baidu.com/image_search/src=http%3A%2F%2Fimage.biaobaiju.com%2Fuploads%2F20180801%2F23%2F1533136040-oNcwkVuRxL.png&refer=http%3A%2F%2Fimage.biaobaiju.com&app=2002&size=f9999,10000&q=a80&n=0&g=0n&fmt=jpeg?sec=1614500688&t=6ba247b6f3bfc546584bf247f2b0e892" alt="这是图片">

    </div>
</body>
</html>
<!--引入vue js文件-->
<script src="../js/vue.js"></script>
<script>
    var app = new Vue({
        el:"#app",//指定vue实例作用范围,
        data:{    //用来给vue实例定义数据
            msg:"hello vue",
            isShow:true,
        },
        methods:{//用来给vue实例定义事件处理函数
            hide(){
                this.isShow = false;
            }
        }
    });
</script>